/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.robot.mapper;

import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper;
import com.pig4cloud.pigx.contract.mongo.entity.ContractSymbolMongo;
import com.pig4cloud.pigx.robot.entity.RobotMarketRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 行情抓取记录表
 *
 * @date 2022-08-11 10:43:37
 */
@Mapper
public interface RobotMarketRecordMapper extends PigxBaseMapper<RobotMarketRecord> {
	/**
	 * 每秒根据行情拉取记录更新当前市价时查询最新的数据
	 *
	 * @param startTime 起始时间（毫秒）
	 * @param symbolIds 币对ids
	 * @return {@link List< ContractSymbolMongo>}
	 * @date 2022/8/12 11:31
	 */
	List<ContractSymbolMongo> listForFlushMarkPrice(@Param("startTime") long startTime,
													@Param("symbolIds") Long... symbolIds);

	int add(RobotMarketRecord robotMarketRecord);
}
